<?php
/**
 * Created by PhpStorm.
 * User: zhangligang
 * Date: 17/4/22
 * Time: 下午2:09
 */

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 点击
 * Class AdvClickRatio
 * @package App\Http\Models
 */
class AdvClickRatio extends Model
{
    /**
     * table name
     * @var string
     */
    protected $table = 'app_adv_click_ratio';

    protected $fillable = ['*'];

    /**
     * 关联广告
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function adv()
    {
        return $this->belongsTo('App\Http\Models\Adv', 'adv_id');
    }

    /**
     * 关联广告位
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function position()
    {
        return $this->belongsTo('App\Http\Models\AdvPosition', 'position_id');
    }

}